package com.situ.mall.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.situ.mall.common.entity.OrderInfo;
import com.situ.mall.common.vo.OrderVO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lwj
 * @since 2023-09-19
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {



    List<OrderInfo> list(@Param("status") String status,@Param("id") Integer mId);

    @Delete("delete from order_info where id = #{id}")
    void myDelete(Integer id);

    List selectOrder(@Param("status") String status, @Param("code") String code);

    @Update("update order_info set status = '2' where id = #{id}")
    void sendGoods(@Param("id") Integer id);

    @Update("update order_info set status = '3' where id = #{id}")
    void confirm(Integer id);

    List<OrderVO> list2(Integer id);

    @Update("update order_info set status = '1' where  code =#{code}")
    void paySuccess(String code);

    @Update("update order_info set status = '3' where id = #{id}")
    void updateOrderStatus(Integer id);
}
